Skip to main content

Accounts Management

Only accounts created through the API can be managed via the API.

Get user information

curl "https://app.sclab.io/api/1/user/get?_userId=jJpp2WfD7yp7y2cEk" \
-H "Authorization: APITokenHere" \
-H "Content-Type: application/json"

or

curl "https://app.sclab.io/api/1/user/[email protected]" \
-H "Authorization: APITokenHere" \
-H "Content-Type: application/json"

The above command returns JSON structured like this:

{
"result": {
"_userId": "jJpp2WfD7yp7y2cEk",
"email": "[email protected]",
"name": "tester",
"phone": "01012341234",
"address": "seoul"
}
}

This endpoint get user information.

HTTP Request

GET https://app.sclab.io/api/1/user/get

JSON Parameters

ParameterRequiredDescription
_userIdNUser id
emailNEmail

Create new account

curl "https://app.sclab.io/api/1/user/create" \
-X POST \
-H "Authorization: APITokenHere" \
-H "Content-Type: application/json" \
-d "{\"email\": \"[email protected]\", \"password\": \"password string\", \"name\": \"user name\"}"

The above command returns JSON structured like this:

{
"result": {
"_userId": "aspfokgwegoepwk",
"status": "user created"
}
}

This endpoint creates new site user account.

HTTP Request

POST https://app.sclab.io/api/1/user/create

JSON Parameters

ParameterRequiredDescription
emailYUser email address
passwordYUser password
nameYUser's name
phoneNUser phone number
addressNUser address

Update account profile

curl "https://app.sclab.io/api/1/user/update" \
-X POST \
-H "Authorization: APITokenHere" \
-H "Content-Type: application/json" \
-d "{\"_userId\": \"userid\", \"name\": \"user name\"}"

The above command returns JSON structured like this:

{
"result": {
"status": "user updated"
}
}

This endpoint update site user account profile [name, phone, address, password].

HTTP Request

POST https://app.sclab.io/api/1/user/update

JSON Parameters

ParameterRequiredDescription
_userIdYUser id
nameNUser's name
phoneNUser phone number
addressNUser address
passwordNUser's password

Delete user from site

curl "https://app.sclab.io/api/1/user/delete" \
-X DELETE \
-H "Authorization: APITokenHere" \
-H "Content-Type: application/json" \
-d "{\"_userId\": \"user id\"}"

The above command returns JSON structured like this:

{
"result": {
"status": "user removed"
}
}

This endpoint remove user from your site.

HTTP Request

DELETE https://app.sclab.io/api/1/user/delete

JSON Parameters

ParameterRequiredDescription
_userIdYUser id

SCLAB User API login sample flow

SCLAB User API login sample flow